package com.gh.thread;

import lombok.Data;
import lombok.NonNull;

/**
 * @author hugx
 * @create 2018-10-24 11:31
 */

@Data
public class OrderVo {
    private int num;
    private float price;

    public OrderVo(int num, float price) {
        this.num = num;
        this.price = price;
    }

    public float getTotalPrice(){
        return num * price;
    }

    public float sm(@NonNull Integer num){
        return num * price;
    }

    public int getNum() {
        System.err.println("******** num");
        return num;
    }
//
//    public void setNum(int num) {
//        this.num = num;
//    }
//
//    public float getPrice() {
//        return price;
//    }
//
//    public void setPrice(float price) {
//        this.price = price;
//    }
}
